package com.cn.wanxi.service;

import com.cn.wanxi.model.CuisineModel;

import java.util.ArrayList;
import java.util.List;

/**
 * 菜系逻辑成
 */
public class CuisineService {
    /**
     * 封装菜系list
     *
     * @return
     */
    public List<CuisineModel> getCuisineList() {
        List<CuisineModel> list = new ArrayList<>();
        CuisineModel cuisineModel = new CuisineModel();

        String[] titles = cuisineModel.getTitles();//拿到菜系数组
        for (int i = 0; i < titles.length; i++) {
            CuisineModel model=new CuisineModel();
            model.setTitle(titles[i]);
            list.add(model);
        }
        return list;
    }
}

